import request from '@/utils/request'
const state = {
  shiftInfo: []
}

const mutations = {
  SET_SHIFT_INFO: (state, shiftInfo) => {
    state.shiftInfo = shiftInfo
  }
}
const actions = {
  /** 获取班次信息 */
  async getShiftInfo ({ commit }) {
    const res = await request.post('/dobo-product/pro/act/team/getTeam')
    if (res.data.code === 200) {
      commit('SET_SHIFT_INFO', res.data.data)
      return res.data.data
    }
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
